<template>
	<view class="index">
		<view class="form-wrapper">
			<view class="form-item">
				<view class="form-label">
					可提现金额：
				</view>
				<view class="form-value">
					{{ info.canWithdrawAmount }}元
				</view>
			</view>
			<view class="form-item">
				<view class="form-label">
					登记簿余额：
				</view>
				<view class="form-value">
					{{ info.registerBalance }}元
				</view>
			</view>
			<view class="form-item">
				<view class="form-label">
					提现金额：
				</view>
				<view class="form-value">
					{{ info.amount }}元
				</view>
			</view>
			<view class="form-item">
				<view class="form-label">
					提现账户：
				</view>
				<view class="form-value">
					{{ info.withAccount }}
				</view>
			</view>
			<view class="form-item">
				<view class="form-label">
					提现账户名：
				</view>
				<view class="form-value">
					{{ info.withAccountName }}
				</view>
			</view>
		</view>

		<view class="form-wrapper">
			<view class="form-item">
				<view class="form-label">
					中信流水号：
				</view>
				<view class="form-value" style="font-size: 26rpx;">
					{{ info.bankSerialNo }}
				</view>
			</view>
			<view class="form-item">
				<view class="form-label">
					提现通道：
				</view>
				<view class="form-value">
					<text v-if="info.withChannel === '00'">
						本行卡提现
					</text>
					<text v-if="info.withChannel === '01'">
						银联代付
					</text>
					<text v-if="info.withChannel === '02'">
						二代小额
					</text>
					<text v-if="info.withChannel === '03'">
						二代大额
					</text>
					<text v-if="info.withChannel === '04'">
						网银互联
					</text>
				</view>
			</view>
			<view class="form-item">
				<view class="form-label">
					提现结果：
				</view>
				<view class="form-value">
					成功
				</view>
			</view>
			<view class="form-item">
				<view class="form-label">
					提现时间：
				</view>
				<view class="form-value">
					{{ info.handleTime }}
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				info: {}
			}
		},
		onLoad(option) {
			this.getInfo(option.id)
		},
		methods: {
			async getInfo(id) {
				const data = await this.$api.post('/app/settlement-ledger/getWithdrawDetail', {
					id: id
				})
				if (data.code == 200) {
					this.info = data.data
				}
			}
		},
		components: {

		}
	}
</script>

<style lang="scss" scoped>
	.index {
		.form-wrapper {
			background-color: #ffffff;
			padding: 0 20upx;
			margin-top: 2rpx;
			overflow: hidden;
			padding-bottom: 30rpx;

			.form-item {
				display: flex;
				align-items: center;
				justify-content: space-between;
				font-size: 32upx;
				margin-top: 30upx;


				.form-label {
					color: #666666;
				}

				.form-value {
					color: #232323;
					flex: 1;
					text-align: left;
				}
			}
		}
	}
</style>